﻿using System;

// Copyright © Microsoft Corporation.  All Rights Reserved.
// This code released under the terms of the 
// Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)

namespace agtest
{
	/// <summary>
	/// Holds a single failover event data point.
	/// </summary>
	public class FailoverData
	{
		public string SourceServer { get; private set; }
		public string TargetServer { get; private set; }
		public TimeSpan FailoverInterval { get; private set; }
		public DateTime EventTime { get; private set; }
		public int Errors { get; private set; }
		public int Delay { get; private set; }
		public int Iteration { get; private set; }
		public string ExceptionData { get; private set; }
		public FailoverData(string sourceServer, string targetServer, TimeSpan failoverInterval, int errors, int iteration, string exceptionData)
		{
			SourceServer = sourceServer;
			TargetServer = targetServer;
			FailoverInterval = failoverInterval;
			Errors = errors;
			EventTime = DateTime.UtcNow;
			Iteration = iteration;
			ExceptionData = exceptionData;
		}
	}
}
